package com.yimiyisu.contract.controller;

import com.zen.ZenController;
import com.zen.ZenData;
import com.zen.ZenEngine;
import com.zen.ZenResult;
import com.zen.annotation.AccessRole;
import com.zen.annotation.Inject;
import com.zen.enums.ZenRole;
import com.zen.kit.DateKit;

@AccessRole(ZenRole.ANONYMITY)
public class Company extends ZenController {
    @Inject
    private ZenEngine zenEngine;

    /**
     * 添加公司
     */
    public ZenResult addCompany(ZenData data) {
        // 免费试用7天
        data.put("expired", DateKit.now() + 3600 * 24 * 7);
        zenEngine.execute("put/company", data);
        return ZenResult.success();
    }
}
